package com.tongjie.hotelbooking.security;

import com.tongjie.hotelbooking.security.user.CurrentUserInfo;
import org.springframework.security.core.context.SecurityContextHolder;

public class SecurityHelper {

    public static CurrentUserInfo getCurrentUserInfo() {
        return (CurrentUserInfo) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }

}
